package com.xysd.express.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.xysd.express.base.BaseFragment;

import java.util.List;

/**
 * Created by donghui on 2017/11/22.
 */

public class LogisticsPagerAdapter extends FragmentPagerAdapter {
    List<BaseFragment> fragments;
    Context context;

    public LogisticsPagerAdapter(FragmentManager fm, Context context, List<BaseFragment> fragments) {
        super(fm);
        this.context = context;
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
